</div>


<?php if(is_weixin()){?>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script>
<script type="text/javascript">
//请求关注提醒信息
$.post('<?php echo U('Home/Ajax/getJsSdk');?>',{url:window.location.href},function(data){
	//$(document).find('body').append(data);
	//alert(data.signature);
	//alert(data.rawString);
	wx.config({
		//debug: true,
		appId: data.appId,
		timestamp: data.timestamp,
		nonceStr: data.nonceStr,
		signature: data.signature,
		jsApiList: [
		  // 所有要调用的 API 都要加到这个列表中
		  
		  'onMenuShareTimeline',
		  'onMenuShareAppMessage',
		 
		] 
	});
	wx.ready(function () {
	  var shareData = {
		title: '<?php echo getPageTitle($seo['title']);?>',
		desc: '<?php echo getPageDescription($seo['description']);?>',
		link: '<?php echo U('', array('aff_id' => $_SESSION['memberInfo']['id']), true, false, true);?>',
		imgUrl: '<?php echo getPageLogo($img_url);?>',
		success: function () { 
        // 用户确认分享后执行的回调函数
		    $.post('<?php echo U('Home/Ajax/weixinshare');?>',{url:'<?php echo U('', array('aff_id' => $_SESSION['memberInfo']['id']), true, false, true);?>'}, function(){
				//success('分享成功！');
			});
        }
	  };
	  wx.onMenuShareAppMessage(shareData);
	  wx.onMenuShareTimeline(shareData);
	});
},'json');</script> 
<?php }?>
</body>
</html>